Fix reading rawCode
from undefined __svelteCsf
#319
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Svelte v5.35.1 sveltejs/svelte#16255 introduced a change to the compiled output of a component. This change broke how we're injecting
parameters.__svelteCsf.rawCode
into stories.For now we're just silently handling the situation where that is now
undefined
at runtime, to not block rendering or testing a story.This does mean however that generated code snippets are now broken in Svelte 5.35.1 and up, and we need a longer term fix for that.
Filed in #320